package com.cgy.utils.elasticsearch.config;

import org.elasticsearch.action.support.WriteRequest;

import com.cgy.utils.elasticsearch.action.CallBack;

import lombok.Getter;
import lombok.Setter;

/**
 * 批量配置
 * @author Administrator
 *
 */
@Getter
@Setter
public class BulkConfig<T> {

    /**
     * 是否实时
     */
    private boolean realtime = true;
    /**
     * 检索之前执行刷新(是)
     */
    private boolean refresh = false;
    /**
     *
     */
    private boolean isAsync;

    /**
     * 超时时间
     */
    private long sessionTimeout = 2L;
    /**
     *
     */
    private CallBack<T> callBack;
    /**
     * 刷新策略
     */
    private WriteRequest.RefreshPolicy refreshPolicy = WriteRequest.RefreshPolicy.WAIT_UNTIL;
}
